package com.htfyun.serialport.uartservo;

public class ServoInterestedInfo {


    private int firmwareVersion;

    //舵机转的位置[0, 360]
    private volatile int position;

    //角速度[0, 100]
    private int angularVelocity;

    //顺时针角度范围(最小角度限制)[0, 360]
    private volatile int angleAreaMin;
    //逆时针角度范围(最大角度限制)[0, 360]
    private volatile int angleAreaMax;

    //如果“顺时针角度限制”和“逆时针角度限制”的值设为 0，
    // 那么设置好速度后，舵机执行“无限旋转模式”。这个特性可用 于连续旋转的轮子。
    private boolean isInInfiniteRotateMode;
    //在“无限旋转模式”下, 是否是顺时针方向旋转. true: 顺时针, false: 逆时针
    private boolean isInfiniteRotateClockWise;

    //马达是否在运动
    private volatile boolean isMoving;

    //扭矩限制范围[0, 100]
    private int torqueLimit;

    //是否使能扭矩
    private boolean torqueEnabled;

    //温度
    private int temperature;
    //负载[0, 100]
    private int load;
    //负载方向 true: 顺时针方向; false: 逆时针方向
    private boolean isLoadClockWise;

    private int zeroPosition;

    // 主动上报时间, 如果小于0, 则不主动上报
    // 时间是 100ms 的倍数
    private int feedbackTime_100ms;

    public int getFirmwareVersion() {
        return firmwareVersion;
    }

    public void setFirmwareVersion(int firmwareVersion) {
        this.firmwareVersion = firmwareVersion;
    }

    public int getPosition() {
        return position;
    }

    public synchronized void setPosition(int position) {
        this.position = position;
    }

    public int getAngularVelocity() {
        return angularVelocity;
    }

    public void setAngularVelocity(int angularVelocity) {
        this.angularVelocity = angularVelocity;
    }

    public int getAngleAreaMin() {
        return angleAreaMin;
    }

    public synchronized void setAngleAreaMin(int angleAreaMin) {
        this.angleAreaMin = angleAreaMin;
    }

    public int getAngleAreaMax() {
        return angleAreaMax;
    }

    public synchronized void setAngleAreaMax(int angleAreaMax) {
        this.angleAreaMax = angleAreaMax;
    }

    public boolean isInInfiniteRotateMode() {
        return isInInfiniteRotateMode;
    }

    public void setInInfiniteRotateMode(boolean inInfiniteRotateMode) {
        isInInfiniteRotateMode = inInfiniteRotateMode;
    }

    public boolean isInfiniteRotateClockWise() {
        return isInfiniteRotateClockWise;
    }

    public void setInfiniteRotateClockWise(boolean infiniteRotateClockWise) {
        isInfiniteRotateClockWise = infiniteRotateClockWise;
    }

    public boolean isMoving() {
        return isMoving;
    }

    public synchronized void setMoving(boolean moving) {
        isMoving = moving;
    }

    public int getTorqueLimit() {
        return torqueLimit;
    }

    public void setTorqueLimit(int torqueLimit) {
        this.torqueLimit = torqueLimit;
    }

    public boolean isTorqueEnabled() {
        return torqueEnabled;
    }

    public void setTorqueEnabled(boolean torqueEnabled) {
        this.torqueEnabled = torqueEnabled;
    }

    public int getTemperature() {
        return temperature;
    }

    public void setTemperature(int temperature) {
        this.temperature = temperature;
    }

    public int getLoad() {
        return load;
    }

    public void setLoad(int load) {
        this.load = load;
    }

    public boolean isLoadClockWise() {
        return isLoadClockWise;
    }

    public void setLoadClockWise(boolean loadClockWise) {
        isLoadClockWise = loadClockWise;
    }

    public int getZeroPosition() {
        return zeroPosition;
    }

    public void setZeroPosition(int zeroPosition) {
        this.zeroPosition = zeroPosition;
    }

    public int getFeedbackTime_100ms() {
        return feedbackTime_100ms;
    }

    public void setFeedbackTime_100ms(int feedbackTime_100ms) {
        this.feedbackTime_100ms = feedbackTime_100ms;
    }

}
